<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
  <h1>商品列表页面</h1>
  <table border="1">
    <tr>
      <th>id</th><th>商品标题</th>
      <th>商品价格</th><th>商品存储</th><th>操作</th>
    </tr>
    <tr>
      <td v-for="p in arr">{{p.id}}</td><td>{{p.title}}</td>
      <td>{{p.price}}</td><td>{{p.num}}</td>
      <td>
        <a href="javascript:void(0)" @click="del(id)">删除</a>
      </td>
    </tr>
  </table>
</div>
<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.min.js"></script>
<script>
  let v=new Vue({
    el:"body>div",
    data:{

    },
    methods:{
      del(){

      }
    },
    created:function (){
      console.log("代码执行了");
      axios.get("/select").then(function (respons) {
        v.arr=respons.data;
      })
    }
  })
</script>
</body>
</html>